package com.streambolics.appengine;

import javax.servlet.http.HttpServletRequest;

import com.google.appengine.api.users.UserServiceFactory;
import com.streambolics.servlet.MissingInformationException;

@SuppressWarnings("serial")
public class MissingUserException extends MissingInformationException
{
    public MissingUserException(HttpServletRequest aRequest)
    {
        super (aRequest, "This function requires a user");
    }

    protected MissingUserException(HttpServletRequest aRequest, String aError)
    {
        super (aRequest, aError);
    }

    @Override
    public String getRedirect ()
    {
        return UserServiceFactory.getUserService ().createLoginURL (getRequest ().getRequestURI ());
    }

}
